home *** CD-ROM | disk | FTP | other *** search
- fsm StockDestroyObjective : integer;
-
- const
- #include_ <content\ABLScripts\mwconst.abi>
-
- type
- #include_ <content\ABLScripts\mwtype.abi>
-
- var
- static ObjectID objective;
-
- function CheckIfObjectiveDestroyed(ObjectID obj) : integer;
- var
- ObjectID who_killed;
-
- code
- if (obj <> -1) then
- if (IsDead(obj) == true) then
- who_killed = WhoDestroyed(obj);
-
- // TODO: objective dead
- endif;
- endif;
-
- endfunction;
-
- function init;
- code
- objective = -1;
-
- SetupScoring_DestroyObjective;
- endfunction;
-
- state startState;
- code
- CheckIfObjectiveDestroyed(objective);
-
- endstate;
-
- state deadState;
- code
-
- endstate;
-
- endfsm.
-
-